﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PhotoGallery.Entities.Owners>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Edit <%=Model.FirstName%></h2>
<% using (Html.BeginForm("Edit","Owners")) { %>
        <%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") %>
        <div>
            <fieldset>
                <legend>Account Information</legend>
                <%=Html.Hidden("OwnerId") %>
                <%=Html.Hidden("UserID")%>
                <%=Html.Hidden("RegistrationDate")%>
                <div class="editor-label">
                    <%: Html.Label("First Name") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBox("FirstName")%>
                </div>
                
                <div class="editor-label">
                    <%: Html.Label("Last Name") %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBox("LastName")%>
                </div>
                <div class="editor-label">
                    <%: Html.Label("Admin Comment") %>
                </div>
                <div class="editor-field">
                  <%if (User.IsInRole("Administrator")){%>
                       <%: Html.TextArea("AdminComment")%>
                    <%} else {%>
                       <%: Html.Label("AdminComment", Model.AdminComment)%>
                    <%}%>
                
                </div>
                <p>
                    <input type="submit" value="Update" />
                </p>
            </fieldset>
        </div>
    <% } %>
</asp:Content>
